package model.kwalificatiebeheer;

public class Uitstroomrichting implements Comparable<Uitstroomrichting>{
	/**
	 * Variables
	 */
	private int id;
	private KwalificatieDossier kd;
	private String afk;
	private String naam;
	private Integer crebo;
	
	/**
	 * Constructors
	 */
	public Uitstroomrichting(int id){
		this.id = id;
	}
	
	public Uitstroomrichting(int id, KwalificatieDossier kd){
		this(id, kd, "", "");
	}
	
	public Uitstroomrichting(int id, KwalificatieDossier kd, String afk, String naam){
		this.id = id;
		this.afk = afk;
		this.naam = naam;
		this.kd = kd;
	}
	
	/**
	 * Getters and Setters
	 */
	public int getId() {
		return id;
	}
	
	public KwalificatieDossier getKd() {
		return kd;
	}

	public void setKd(KwalificatieDossier kd) {
		this.kd = kd;
	}

	public String getAfk() {
		return afk;
	}

	public void setAfk(String afk) {
		this.afk = afk;
	}

	public String getNaam() {
		return naam;
	}

	public void setNaam(String naam) {
		this.naam = naam;
	}

	public Integer getCrebo() {
		return crebo;
	}

	public void setCrebo(Integer crebo) {
		this.crebo = crebo;
	}

	/**
	 * @Override
	 * @name: 		compareTo
	 * @description:Compares given Object to this
	 * 				Object. Returns 0 if equals, 
	 * 				returns id if not equals.
	 * @return:		String
	 */
	public int compareTo(Uitstroomrichting ur) {
		return ur.getId() == id ? 0 : id;
	}
	
	/**
	 * @Override
	 * @name: 		toString
	 * @description:Creates String from Object
	 * @return:		String
	 */
	public String toString(){
		return "Uitstroomrichting { id: "+id+" | afk: "+afk+" | naam: "+naam+" }";
	}
}
